import java.io.PrintStream;
import java.util.Scanner;

public class task02
{

    public task02()
    {
    }

    public static void main(String args[])
    {
        Scanner input = new Scanner(System.in);
        String email = input.next();
        if(resarch(email) && found(email))
        {
            System.out.println("\u5730\u5740\u6709\u6548");
            input.close();
            return;
        } else
        {
            input.close();
            System.out.println("\u5730\u5740\u65E0\u6548");
            return;
        }
    }

    public static boolean resarch(String email)
    {
        int ax;
        int ay;
        return (ax = email.indexOf("@")) != -1 && (ay = email.indexOf(".")) != -1 && ax < ay && ax != 0;
    }

    public static boolean found(String eamil)
    {
        return founds(eamil, "com") || founds(eamil, "cn") || founds(eamil, "net") || founds(eamil, "gov") || founds(eamil, "edu") || founds(eamil, "org");
    }

    public static boolean founds(String email, String cm)
    {
        return email.indexOf(cm) != -1;
    }
}
